import request from '@/utils/request'

// 获取角色列表
export function getRoleList(params) {
  return request({
    url: '/sysRole/getPageList',
    method: 'POST',
    params: params
  })
}

// 新增角色
export function addRole(params) {
  return request({
    url: '/sysRole/add',
    method: 'POST',
    params: params
  })
}

// 删除角色
export function removeRole(params) {
  return request({
    url: '/sysRole/delete',
    method: 'POST',
    params: params
  })
}

// 角色信息修改
export function updateRole(params) {
  return request({
    url: '/sysRole/updateSysRolePermission',
    method: 'POST',
    params: params
  })
}

// 查看角色信息
export function lookRoleInfo(params) {
  return request({
    url: '/sysRole/info',
    method: 'GET',
    params: params
  })
}

// 获取角色菜单
export function getRoleMenu(params) {
  return request({
    url: '/sysPermission/getAllMenuTree',
    method: 'POST',
    params: params
  })
}
